<cfcomponent displayname="ProjectAttributeService" output="false">

	<cffunction name="setAttributeService" returntype="void" access="public" output="false" hint="Import: Attribute Service">
		<cfargument name="attributeService" required="true"/>
		<cfset variables.attributeService = arguments.attributeService />
	</cffunction>

	<cffunction name="getAttributeService" returntype="any" access="private" output="false" hint="Import::Attribute Service">
		<cfreturn variables.attributeService />
	</cffunction>

	<cffunction name="setPersistenceService" returntype="void" access="public" output="false" hint="Import: Persistence Service">
		<cfargument name="persistenceService" required="true"/>
		<cfset variables.persistenceService = arguments.persistenceService />
	</cffunction>

	<cffunction name="getPersistenceService" returntype="any" access="private" output="false" hint="Returns Internal: Persistence Service">
		<cfreturn variables.persistenceService />
	</cffunction>

	<cffunction name="init" returntype="any" output="false" hint="Constructor">
		<cfreturn this />
	</cffunction>

	<cffunction name="createProjectAttributeObject" returntype="any" output="false" hint="Create Project Object">
		<cfargument name="componentName" default="actionpacks.projectshen.model.project.ProjectAttribute">
		<cfset var retObject = createObject("component",arguments.componentName)>
		<cfreturn retObject />
	</cffunction>

	<cffunction name="createAttributeObject" returntype="any" output="false" hint="Create Project Object">
		<cfargument name="componentName" default="actionpacks.projectshen.model.attribute.Attribute">
		<cfset var retObject = createObject("component",arguments.componentName)>
		<cfreturn retObject />
	</cffunction>
	
	<cffunction name="getAttributesQry" access="public" returntype="any" output="false" roles="" hint="Returns: project">
		<cfargument name="project" required="true">
		<cfargument name="attributeTypeName" required="true" />
		<cfset var projectId = arguments.project.getProjectId()>
		<cfset var projectAttributeObject = createProjectAttributeObject() />
		<cfset var list = "">
		<cfset projectAttributeObject.setProjectId(projectId) />
		<cfset list = getPersistenceService().query(projectAttributeObject) />
		<cfset list = getAttributeService().getAttributesByIdsQry(valueList(list.attributeid),attributeTypeName)>
	  <cfreturn list />
	</cffunction>

</cfcomponent>